Containment and Optimization of Object-Preserving Conjunctive Queries
نویسندگان
چکیده
In the optimization of queries in an object-oriented database system (OODB), a natural rst step is to use the typing constraints imposed by the schema to transform a query into an equivalent one that logically accesses a minimal set of objects. We study a class of queries for OODB's called conjunctive queries. Variables in a conjunctive query range over heterogeneous sets of objects. Consequently, a conjunctive query is equivalent to a union of conjunctive queries of a special kind, called terminal conjunctive queries. Testing containment is a necessary step in solving the equivalence and minimization problems. We rst characterize the containment and minimization conditions for the class of terminal con-junctive queries. We then characterize containment for the class of all conjunctive queries, and derive an optimization algorithm for this class. The equivalent optimal query produced is expressed as a union of terminal conjunctive queries which has the property that the number of variables as well as their search spaces are minimal among all unions of terminal conjunctive queries. Finally, we investigate the complexity of the containment problem. We show that it is complete in p 2 .
منابع مشابه
Technical Note: BIRN-DI-TN-2003-01 Query Containment, Minimization, and Semantic Optimization of Conjunctive Queries (or: More on Uncles and Aunts)
This technical note presents the ubiquitous problem of query containment for conjunctive queries (an NP-complete problem), and an elegant implementation CQCP of Conjunctive Query Containment in Prolog, in just 7 lines of code. We also describe two important applications of conjunctive query containment: semantic query optimization and minimization. The latter can be implemented by another conci...
متن کاملDecidable Containment of Recursive Queries
One of the most important reasoning tasks on queries is checking containment, i.e., verifying whether one query yields necessarily a subset of the result of another one. Query containment, is crucial in several contexts, such as query optimization, query reformulation, knowledge-base verification, information integration, integrity checking, and cooperative answering. Containment is undecidable...
متن کاملThe Query Containment Problem: Set Semantics vs. Bag Semantics
Query containment is a fundamental algorithmic task in database query processing and optimization. Under set semantics, the query-containment problem for conjunctive queries has long been known to be NP-complete. SQL queries, however, are typically evaluated under bag semantics and return multisets as answers, since duplicates are not eliminated unless explicitly specified. The exact complexity...
متن کاملSome Results on the Containment and Minimization of (in) Equality Queries
The containment and minimization of conjunctive queries are two basic problems of query optimization in relational and deductive databases. For equality queries, the problems are NP{complete due to the \homomorphism property". For (in)equality queries, however, the containment problem has recently been proved to be p 2 {complete ((12]), while the minimization is virtually unknown. In this paper...
متن کاملConjunctive Query Containment in Description Logics with n-ary Relations
Recent research points out that query containment is a central problem in several database and knowledge base applications, including data warehousing, data integration, query optimization, and (materialized) view maintenance. In this paper we present a decision procedure for containment of conjunctive queries de ned over a database schema speci ed in a very expressive description logic, compri...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- SIAM J. Comput.
دوره 29 شماره
صفحات -
تاریخ انتشار 2000